package com.xbongbong.pro.performance.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.saas.constant.BasicConstant;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @description: 一键汇总
 * @Author: hongxiao
 * @date: 2019-02-19 20:53
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class PerformanceAggDepartmentDTO extends BaseDTO {
    /**
     * 指标id
     */
    @NotNull(message = "{dto.msg.performanceAggDepartment.setId.NotNull}")
    private Long setId;
    /**
     * 筛选的财年年份
     */
    @NotNull(message = "{dto.msg.performanceAggDepartment.year.NotNull}")
    private Integer year;
    /**
     * 当在最小考核周期为“周”的页面时，要传该值（后台要通过该值把自然年year处理成财年年份）
     */
    private Integer month;
    /**
     * 指标类型：1系统指标,2自定义指标
     */
    @NotNull(message = "指标类型不能为空")
    @Range(min=1,max=2,message = "指标类型传值异常")
    protected Integer statisticsType;

    /**
     * 是否汇总离职员工，默认不汇总
     */
    private Integer aggLeaveMark;
    /**
     * 汇总的部门id，如果不传则汇总考核对象内所有部门
     */
    private List<Long> depIdList;

    public PerformanceAggDepartmentDTO(){
        this.aggLeaveMark = BasicConstant.ZERO;
    }
}
